﻿using GSOrganization.Application;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;

namespace Furion.Web.Entry.Controllers;

[AllowAnonymous]
public class RegisterController : Controller
{

    private readonly ISysPersonService _sysPersonService;
 
    public RegisterController(ISysPersonService sysPersonService )
    {
        _sysPersonService = sysPersonService;
       

    }

    /// <summary>
    /// 单位注册
    /// </summary>
    /// <returns></returns>

    public IActionResult Index()
    {
        return View();
    }
    /// <summary>
    /// 单位注册
    /// </summary>
    /// <returns></returns>
    [HttpPost]

    public IActionResult Register([FromBody] RegisterInput entity)
    {

        var data = _sysPersonService.Register(entity);
       
            return Json(data);
        

    }



}
